package com.qf.smartplatform.task;

import com.qf.smartplatform.websocket.MyCommandHandler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * projectName:day12_27_Test
 * author:guoLei
 * time:2022/1/10 14:32
 * description:
 */
@Component
@EnableScheduling
public class DevicePowerTask {
   @Scheduled(fixedRate = 60000)
   public void checkHeartBeat() {
       System.err.println("准备开始检查设备在线状态");
       MyCommandHandler.checkStatus();
   }
}
